package com.nacos.listener;

/**
 * @author: li chao
 * @Desc:
 * @create: 2024-07-01 20:06
 **/
public class ListenerMain {
    public static void main(String[] args) {
        try {
            ConfigListener listener = new CmsConfigListenerImpl();
            listener.addListener("myKey", value -> {
                // 处理配置更新的逻辑
                System.out.println("Received new config value: " + value);
            });
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}